package com.coocaa.x.test.action;

import org.junit.Assert;

/**
 * Created by luwei on 15-8-21.
 */
public class ClickAction extends TestAction<String> {


    private String name = "";

    public enum CLICK_ACTION {
        ACTIVITY,
        ACTION,
        VIDEO
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {

        return name;
    }

    public ClickAction() {
        super();
    }

    public ClickAction(CLICK_ACTION action, String name) {
        super(TEST_TYPE.CLICK);
        this.name = name;
        System.out.println("name is " + name);
    }

    @Override
    public boolean checkResult(String s) {
        boolean flag = name.contains(s);
        Assert.assertTrue("launcher failed need is " + name + " but actual is " + s, flag);
        return true;
    }
}
